//---------------------------------------------------------------------------
#ifndef CDBChkbH
#define CDBChkbH
//---------------------------------------------------------------------------
#include "CtrlDB.h"
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <DBCtrls.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
class PACKAGE_CTRLDB CDBCheckBox : public TDBCheckBox
{
private:
  bool m_ReadOnly;
  bool m_Enabled;

  void __fastcall SetReadOnly    (bool value);
  void __fastcall SetEnabled     (bool value);

protected:
  void __fastcall WMPaint(TWMPaint &Msg);
  BEGIN_MESSAGE_MAP
   MESSAGE_HANDLER(WM_PAINT, TWMPaint, WMPaint)
  END_MESSAGE_MAP(TDBCheckBox)

public:
  __fastcall CDBCheckBox(TComponent* Owner);
__published:
  __property bool Enabled      = { read=m_Enabled     , write=SetEnabled     , default=true  };
  __property bool ReadOnly     = { read=m_ReadOnly    , write=SetReadOnly    , default=false };
};
//---------------------------------------------------------------------------
#endif
